package com.example.chcrm.entity.supplier;

import com.baomidou.mybatisplus.annotation.*;
import com.example.chcrm.entity.common.OperateRecord;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Author 邹
 * @Date 2025/4/20 22:50
 * @Version 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class HighwaySupplierCar implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.INPUT)
    private String id;

    @NotBlank(message = "所属供应商不能为空")
    private String fleetId;     //所属供应商id
    @NotBlank(message = "所属供应商不能为空")
    private String fleetName;   //所属供应商名字
    @NotBlank(message = "车牌号不能为空")
    private String license;     //车牌号
    @NotBlank(message = "品牌不能为空")
    private String brand;       //品牌
    @NotBlank(message = "型号不能为空")
    private String model;       //型号
    @NotNull(message = "整车尺寸不能为空")
    private Double sizeLong;    //整车尺寸长
    @NotNull(message = "整车尺寸不能为空")
    private Double sizeWidth;   //整车尺寸宽
    @NotNull(message = "整车尺寸不能为空")
    private Double sizeHeight;  //sizeHeight
    @NotBlank(message = "最大承载不能为空")
    private String loadMax;     //最大承载
    @NotNull(message = "最大托运数量不能为空")
    private Integer checkMax;       //最大托运数量

    @NotNull(message = "颜色不能为空")
    private Integer colour; //1 蓝色  ;2黄色;3黑色;4白色;9其他
    private String driverName;  //绑定司机名字

    @TableField("isEnable")
    private Integer isEnable;   //启用状态 0：禁用 1：启用
    private Integer status;     //出车状态：0：空闲中 1：运输中 2：车辆故障

    @TableLogic(value = "0", delval = "-1")
    private Integer isDeleted;  //是否删除 0：否 -1：是
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;    //创建时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;    //修改时间

    private Integer auditStatus;    //审核状态 0：待审核 1：未通过 2：已通过

    /**
     * 操作记录
     */
    @TableField(exist = false)
    private List<OperateRecord> operateRecordList;

    /**
     * 出车状态：0空闲中，1运输中，2故障
     */
    public static final int STATE_00 = 0;
    public static final int STATE_01 = 1;
    public static final int STATE_02 = 2;
    @TableField(exist = false)
    private Integer page = 1;
    @TableField(exist = false)
    private Integer rows = 10;
}
